package framework.spring.mvc;


import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import entity.TestDO;

@Controller  
@RequestMapping("/register.htm")  
public class AnnotationControllerTest {
    @RequestMapping(method=RequestMethod.GET) 
    public ModelAndView register(HttpServletRequest request) {  
    	 request.setAttribute("test", "Hello World!");
    	 request.setAttribute("requestData", "hunan");  
    	 TestDO test = new TestDO();
    	 test.setEmail("liuboen@denong.com");
    	 test.setId(1l);
    	 test.setName("liuboen");
    	 request.setAttribute("persons", test);
    	 Map<String, Object> map = new HashMap<String, Object>();
    	 map.put("test", "Hello World!");
    	 map.put("requestData", "hunan");
        // ��������þ����ҵ���߼�����  
        return new ModelAndView("vtest.vm","map",map);  
    }  
}
